import { reqGetBookingRoomList } from "@/api";
import { Message } from "element-ui";

export default({
    namespaced:true,
    actions:{
        async getBookingRecordList(context,value){
            let result=await reqGetBookingRoomList(value);
            if(result.code==='200'){
                context.commit('getBookingRecordList',result.other);
            }else{
                Message({
                    message: '警告!'+'['+result.code+']'+'['+result.message+']',
                    type: 'warning'
                })
                return;
            }
        }
    },
    mutations:{
        getBookingRecordList(state,value){
            state.bookingRecordList=value;
        }
    },
    state:{
            bookingRecordList:[]
    },
    getters:{

    }
})